<!--
 * @Author: HC
 * @Date: 2022-04-22 14:42:31
 * @LastEditTime: 2022-04-22 17:21:29
 * @Description:
-->
<template>
  <div class="comparison">
    <Dialog content="按照该vip客户落地区县的收入纬度，分析资产落地该区县的资产收入环比上升情况"></Dialog>
    <div class="table">
      <el-table border style="width: 100%" :header-cell-style="{
          background: '#0070C0',
          color: '#ffffff',
        }" :data="tableData" v-loading="tableLoading">
        <el-table-column label="环比增长大颗粒资产TOP100" prop="city" align="center">
          <el-table-column label="号码" prop="accsNbr" align="center"></el-table-column>
          <el-table-column label="产品" prop="prdName" align="center"></el-table-column>
          <el-table-column label="客户" prop="custName" align="center"></el-table-column>
          <el-table-column label="归属" prop="areaName" align="center"></el-table-column>
          <el-table-column label="环比增长(万元)" prop="hb" align="center"></el-table-column>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
// import { grain } from "@/api/barCode/index";

import $barCodeApi from "@/api/barCode/index";
import Dialog from './dialog.vue'


export default {
  name: "comparison",
  components: {Dialog},
  props: {
    form: {
      type: Object,
      default: {},
    },
  },
  data () {
    return {
      tableData: [],
      tableLoading: false,
    };
  },
  created () { },
  mounted () { },
  methods: {
    getList () {
      this.tableLoading = true
      // grain({
      //   acctMonth: this.form.acctMonth,
      //   type: '1'
      // }).then((res) => {
      //   if (res.code == 0) {
      //     this.tableLoading = false;
      //     this.tableData = res.content;
      //   }
      // });

      $barCodeApi.grain({
        acctMonth: this.form.acctMonth,
        areaId: this.form.areaId,
        type: '1'
      }, res => {
        if (res.code == 0) {
          this.tableLoading = false;
          this.tableData = res.content;
        }
      });
    },
  },
};
</script>

<style scoped lang="scss">
.table {
  display: flex;
}
</style>
